package cn.likole.oj.bean;

import org.nutz.dao.entity.annotation.*;

import java.util.Date;

/**
 * 背包
 */
@Table("bag")
@PK({"userId","siteIndex"})
@TableIndexes(@Index(fields = "userId",unique = false))
public class Bag {

    /**
     * 用户id
     */
    @Column
    private int userId;

    /**
     * 物品id
     */
    @Column
    private int goodsId;

    /**
     * 物品数量
     */
    @Column
    private int num;

    /**
     * 背包中的位置
     */
    @Column
    private int siteIndex;

    /**
     * 获取时间
     */
    @Column
    private Date getTime;

    /**
     * 失效时间
     */
    @Column
    private Date expireTime;

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(int goodsId) {
        this.goodsId = goodsId;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public int getSiteIndex() {
        return siteIndex;
    }

    public void setSiteIndex(int siteIndex) {
        this.siteIndex = siteIndex;
    }

    public Date getGetTime() {
        return getTime;
    }

    public void setGetTime(Date getTime) {
        this.getTime = getTime;
    }

    public Date getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(Date expireTime) {
        this.expireTime = expireTime;
    }
}
